<%@ page contentType="text/html;charset=UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@include file="../../common/includeBaseSet.jsp" %>
<%@include file="../../common/includeSystemSet.jsp" %>
<%@include file="../../common/operation_forbid.jsp" %>
<%@include file="../../common/jsVersion.jsp" %>
<!-- 右侧楼栋信息 -->
<div id="rightUnitDiv">
	<form id="baseUnitForm" method="POST" onsubmit="return false;">
	<div class="widget-main customBtn">	
		
		
		
		
		 <c:forEach var="btn" items="${permitBtn}">
        		<c:choose>
				<c:when test="${btn.permission=='estate:projectUnit:edit'}"><button type="button" id="btn_unitUpdate" class="btn btn-warning  btn-sm">
				<span class="glyphicon glyphicon-search">编辑</span>
			</button>
				&emsp;</c:when>
				<c:when test="${btn.permission=='estate:projectRoom:saveBatchData'}">
					<button type="button" id=btn_unitBatchUpdate class="btn btn-primary btn-sm">
			<span class="glyphicon glyphicon-edit">批量修改</span>
		</button>
		&emsp;
				</c:when>
				<c:when test="${btn.permission=='estate:projectRoom:delete'}">
					<button type="button" id="btn_unitDel" class="btn btn-primary btn-sm">
			<span class="glyphicon glyphicon-minus">删除</span>
		</button>
				</c:when>
				</c:choose>						
			</c:forEach>
		
	</div>
	<c:if test="${!empty ar.obj}">
	<input type="hidden" id="projectId" value="${ar.obj.projectId}">
	<input type='hidden' name='unitId' value="${ar.obj.id}" />
	</c:if>
	<c:if test="${!empty parentName}">
	<input type='hidden' name='parentName' value="${parentName}" />
	</c:if>
	<c:if test="${!empty manageObject}">
	<input type='hidden' name='manageObject' value="${manageObject}" />
	</c:if>
	</form>
	<c:choose>
	<c:when test="${!empty ar.obj}">
	<table id="unitTable" class="table table-bordered table-hover" >
		<tr>
			<td style="background-color: #D8D8D8; font-size: 16px; font-weight: bold;">单元详情</td>
		</tr>
		<tr>
			<td><b>管理对象</b>&emsp;&emsp;${manageObject}</td>
		</tr>
		<tr>
			<td><b>单元编号</b>&emsp;&emsp;${ar.obj.unitCode}</td>
		</tr>
		<tr>
			<td><b>单元名称</b>&emsp;&emsp;${ar.obj.unitName}</td>
		</tr>
		<tr>
			<td><b>备&emsp;&emsp;注</b>&emsp;&emsp;${ar.obj.remark}</td>
		</tr>
	</table>
	</c:when>
	<c:otherwise>
	<table id="unitTable" class="table table-bordered table-hover" >
		<tr>
			<td style="background-color: #D8D8D8; font-size: 16px; font-weight: bold;">楼栋详情</td>
		</tr>
		<tr>
			<td style="text-align: center;"><h1>${ar.resMsg}</h1></td>
		</tr>
	</table>
	</c:otherwise>
	</c:choose>
</div>
<script src="${jypath}/static/js/estate/unit/unit.js?v=${jsVersion}"></script>
